<?php $this->JQuery()->enable();?>

<script type="text/javascript">
$(function(){
	 
    $("#selectall").click(function () {
          $('.case').attr('checked', this.checked);
    });
 
    $(".case").click(function(){
 
        if($(".case").length == $(".case:checked").length) {
            $("#selectall").attr("checked", "checked");
        } else {
            $("#selectall").removeAttr("checked");
        }
 
    });
});
</script>
<div id="page-heading">
		<h1>Danh sách điểm thi</h1>
	</div>
	<!-- end page-heading -->

	<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
	<tr>
		<th rowspan="3" class="sized"><img src="images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
		<th class="topleft"></th>
		<td id="tbl-border-top">&nbsp;</td>
		<th class="topright"></th>
		<th rowspan="3" class="sized"><img src="images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
	</tr>
	<tr>
		<td id="tbl-border-left"></td>
		<td>
	<div id="content-table-inner">
		
			<!--  start table-content  -->
			<div id="table-content">
			<?php echo $this->flashMessages();?>
<!--  start product-table ..................................................................................... -->
				<form id="mainform" action="" method="post">
				<table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
				<tr>
					<th class="table-header-check"><input type="checkbox" id="selectall"/></th>
					<th class="table-header-repeat line-left"><a>Mã học viên</a></th>
					<th class="table-header-repeat line-left"><a>Tên lớp</a></th>
					<th class="table-header-repeat line-left"><a>Họ tên học viên</a></th>
					<th class="table-header-repeat line-left"><a>Năm sinh</a></th>
					<th class="table-header-repeat line-left"><a>Ngày thi</a></th>
					<th class="table-header-repeat line-left"><a>Điểm</a></th>
					<th class="table-header-repeat line-left"><a>Kết quả</a></th>
					<th class="table-header-options line-left"><a>Tùy chọn</a></th>
				</tr>
				
				
<?php
		foreach($this->danhsach as $danhsach)
		{
		
		$khoahoc = $danhsach->getKhoahoc();
		$lophoc = $khoahoc->getLophoc();
		$kythi = $khoahoc->getKythi();
		$tenlop = $lophoc->getTenlop();
		$ngaythi = $kythi->getNgaythi();
		
		$iddiem = $danhsach->getId();
		$diem = $danhsach->getDiem();
		$ketqua = $danhsach->getKetqua();
		$hocvien = $danhsach->getHocvien();
			
		$id = $hocvien->getId();
		$tenhocvien = $hocvien->getTenhocvien();
		$namsinh = $hocvien->getNamsinh();
		
		$linkDelete = $this->baseUrl('/admin/diemthi/xoa/id/'. $id);
		
		
?>
	<tr>
					<td><?php echo $this->formCheckbox('case'.$id,'1',array('class'=>'case'))?></td>
					<td><?php echo $id?></td>
					<td><?php echo $tenlop?></td>
					<td><?php echo $tenhocvien?></td>
					<td><?php echo $namsinh?></td>
					<td><?php echo $ngaythi?></td>
					<td><?php echo $this->formText('diem'.$iddiem,$diem,array('size'=>'2px'))?></td>
					<td><?php echo $ketqua?></td>
					<td class="options-width">
					<a href="<?php echo $linkDelete?>" title="Edit" class="icon-2 info-tooltip"></a>
					</td>
				</tr>
<?php
			
		
		}
?>
			</table>
			<div><?php echo $this->formSubmit('submit','Cập nhật');?></div>
				<!--  end product-table................................... -->
				</form>
				</div>
			<!--  end content-table  -->
		
			
			<!--  start paging..................................................... -->
			<table border="0" cellpadding="0" cellspacing="0" id="paging-table">
			<tr>
			<td>
				<a href="" class="page-far-left"></a>
				<a href="" class="page-left"></a>
				<div id="page-info">Page <strong>1</strong> / 15</div>
				<a href="" class="page-right"></a>
				<a href="" class="page-far-right"></a>
			</td>
			</tr>
			</table>
			<!--  end paging................ -->
			
			<div class="clear"></div>
		 
		</div>
		
		</td>
		<td id="tbl-border-right"></td>
	</tr>
	<tr>
		<th class="sized bottomleft"></th>
		<td id="tbl-border-bottom">&nbsp;</td>
		<th class="sized bottomright"></th>
	</tr>
	</table>
	<div class="clear">&nbsp;</div>

</div>